import Vue from 'vue'
import Router from 'vue-router'
import Login from '../view/login/index'
import Layout from '../layout'
import DefaultHome from '../view/defaulthome/index'
import Student from '../view/student/index'
import TeacherList from '../view/teacher/teacher_list'
import Profile from '../view/profile/index'
import CourseList from '../view/course/course_list'
import SelectList from '../view/select/select_list'
Vue.use(Router)

export default new Router({
  routes: [
    {path:'/',redirect:'/login'},
    {
      path: '/login',
      component: Login,
      hidden:true
    },
    {path:'/home',component:Layout,
      children:[
        {path: '/', redirect: '/defaultHome'},
        {path: '/defaultHome',component: DefaultHome,meta: { title: '工作台', icon: 'dashboard',breadcrumb:false }},
        {path:'/student',component:Student,meta: { title: '学生列表' }},
        {path:'/teacherList',component:TeacherList,meta: { title: '教师列表' }},
        {path:'/profile',component:Profile,meta: { title: '个人中心' }},
        {path:'/courseList',component:CourseList,meta:{ title: '课程列表' }},
        {path:'/selectList',component:SelectList,meta:{ title: '学生选课列表' }},
      ]
    }
  ]
})
